package com.lagou.StageTwo.Assignment3.Service.Impl;


import com.lagou.StageTwo.Assignment3.Service.CallService;
import com.lagou.StageTwo.Assignment3.po.PackagesAbstract;
import com.lagou.StageTwo.Assignment3.po.PhoneCard;

/**
 * 通话套餐类
 * （2）通话套餐类 特征：通话时长、短信条数、每月资费 行为: 显示所有套餐信息
 * @author 常红伟
 */
public class CallPackageImpl extends PackagesAbstract implements CallService {

    /**
     * 通话时长(分钟)
     */
    String duration;

    /**
     * 短信条数
     */
    String messageNum;


    public CallPackageImpl() {
    }

    public CallPackageImpl(String duration, String messageNum, String monthlyRates) {
        super(monthlyRates);
        setDuration(duration);
        setMessageNum(messageNum);

    }

    public String getDuration() {
        return duration;
    }

    public void setDuration(String duration) {
        this.duration = duration;
    }

    public String getMessageNum() {
        return messageNum;
    }

    public void setMessageNum(String messageNum) {
        this.messageNum = messageNum;
    }



    /**
     * 行为: 显示所有套餐信息
     */
    @Override
    public void show(){
        System.out.println("当前套餐通话分钟为:"+duration+",短信条数为:"+messageNum+",每月费用为："+getMonthlyRates());
    }

    @Override
    public void callPackages(String duration, PhoneCard phoneCard) {
        System.out.println("测试通话服务！");
    }
}
